package com.smh.a05printStreamDemo1;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.nio.charset.Charset;

public class PrintStreamDemo1 {
    public static void main(String[] args) throws FileNotFoundException {

        //字节打印流
        PrintStream ps = new PrintStream(new FileOutputStream("day27-code\\file\\demo3\\a.txt"), true, Charset.forName("UTF-8"));

        ps.println(97);
        ps.print(true);
        ps.println();
        ps.printf("%s爱上了%s", "阿珍", "阿强");
        ps.printf("%s爱上了%s", "阿珍", "阿强");

        ps.close();


    }
}
